import logging

def logger():
    log = logging.basicConfig(level=logging.DEBUG,
                              filename='log.txt',
                              format='%(message)s %(thread)d %(filename)s %(asctime)s ')
    return log